using UnityEngine;
using System.Collections;

public class SnapObject : MonoBehaviour {

	public UISprite thisSprite;
	Transform thisTransform;
	
	void Awake () 
	{
		thisTransform = transform;
	}

	void OnTriggerEnter ( Collider hit )
	{
		if ( hit.gameObject.tag == "SnapArea" )
		{
			thisTransform.position = hit.gameObject.transform.position;
			QuestionManager.Instance.submitSortShapes[int.Parse(hit.gameObject.name)] = thisSprite;
		}
	}
}
